#include<iostream>
#include<vector>
using namespace std;
void test()
{
  class Solution {
    public:
          bool exist(vector<vector<char>>& board, string word)
          {
                    //先查找元素的第一个位置
               row=board.size();
               col=board[0].size();
                for(int i=0;i<row;i++)
                {
                  for(int j=0;j<col;j++)
                  {
                    if(_dfs(board,word,i,j))
                    {
                      return true;
                    }
                  }
                }
              return false;              
          }
    private:
          int row, col;
         bool _dfs(vector<vector<char>>& board, string word,int i,int j,int k)
         {
           if(i>=row||i<0||j>=col||j<0||word[k]!=board[i][j])
           {
             return false;
           }
           if(k==word.size()-1)
           {
             return true;
           }
               bool res=_dfs(board,word,i+1,j,k+1)||_dfs(board,word,i,j+1,k+1)
               ||_dfs(board,word,i-1,j,k+1)||_dfs(board,word,i,j-1,k+1);
              //向四个方向递归查找
               board[i][j]=word[k];
               return res;
         }

}
int main()
{
  return 0;
}
